﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using FrameworkDesign.Example;
public class GameStartPanel : MonoBehaviour
{
    public GameObject Enemies;
    // Start is called before the first frame update
    void Start()
    {
        transform.Find("BtnStart").GetComponent<Button>()
            .onClick.AddListener(() =>
            {
                gameObject.SetActive(false);// 把GameStartPanel自身这个UI界面隐藏掉

                // 不再触发事件，而是发送命令
                new StartGameCommand().Execute();
            });
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
